<?php
include("../../classes/bd.php");
include("../../classes/midia.php");
$_mid	= new midia();

$_mid->id			= $_REQUEST["idmidia"];
$_mid->idnoticia	= $_REQUEST["idnoticia"];
$_mid->tipo			= $_REQUEST["tipo"];


$cadastra	= $_mid->insereMidiaNoticia();

if($cadastra){
echo $_mid->idnoticia;
}else{
echo "error";
}


?>